package homework;

import java.util.LinkedList;
import java.util.Queue;

public class HomeWork30 {
    Queue<Integer>queue;
    public HomeWork30() {
        queue=new LinkedList<>();
    }
    public int ping(int t) {
        queue.offer(t);
        while (t-3000<queue.peek()){
            queue.poll();
        }
        return queue.size();
    }
}
